#!/bin/bash
volumes=$1
echo $volumes
if [[ -n ${volumes} ]]; then
    echo $volumes | tr "," "\n" > volumes.txt
    while read line; do
        str=$(echo $line)
        echo $str
        sed -i "/volumes/a\      - $str" docker-compose.tpl
    done < volumes.txt
fi
